package com.xieyingwangluo.yxpart.service.impl;

import com.xieyingwangluo.yxpart.bean.Result;
import com.xieyingwangluo.yxpart.entity.EnrollModel;
import com.xieyingwangluo.yxpart.mapper.EnrollMapper;
import com.xieyingwangluo.yxpart.service.EnrollService;
import com.xieyingwangluo.yxpart.service.UserService;
import com.xieyingwangluo.yxpart.utils.StringBuildUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EnrollServiceImpl implements EnrollService {
    @Autowired
    EnrollMapper enrollMapper;

    //添加
    @Override
    public int add(EnrollModel enrollModel) {
        return enrollMapper.add(enrollModel);
    }

    //模糊查询报名信息
    @Override
    public List<EnrollModel> selA(EnrollModel enrollModel) {
        return enrollMapper.selA(enrollModel);
    }

    //根据用户id和兼职id查找报名表
    @Override
    public List<EnrollModel> selUserAndPart(String userinfo_id, String part_id) {
        return enrollMapper.selUserAndPart(userinfo_id, part_id);
    }

    //查询报名信息
    @Override
    public List<EnrollModel> selO(String userinfo_id) {
        return enrollMapper.selO(userinfo_id);
    }

    //取消报名
    @Override
    public int del(String noid) {
        return enrollMapper.del(noid);
    }
}
